<!-- BEGIN CORE PLUGINS -->

<script src="../unit/common/js/bootstrap_js/jquery-1.10.1.min.js" type="text/javascript"></script>

<script src="../unit/common/js/bootstrap_js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>

<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

<script src="../unit/common/js/bootstrap_js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="../unit/common/js/bootstrap_js/bootstrap.min.js" type="text/javascript"></script>

<!--[if lt IE 9]>

<script src="../unit/common/js/bootstrap_js/excanvas.min.js"></script>

<script src="../unit/common/js/bootstrap_js/respond.min.js"></script>

<![endif]-->

<script src="../unit/common/js/bootstrap_js/jquery.slimscroll.min.js" type="text/javascript"></script>

<script src="../unit/common/js/bootstrap_js/jquery.blockui.min.js" type="text/javascript"></script>

<script src="../unit/common/js/bootstrap_js/jquery.cookie.min.js" type="text/javascript"></script>

<script src="../unit/common/js/bootstrap_js/jquery.uniform.min.js" type="text/javascript" ></script>

<!-- END CORE PLUGINS -->

<script src="../unit/common/js/common/main_portal.js"></script>

<script>

    $(".signOut").on("click",function(){
        sessionStorage.clear();
        $('.noLogin').html('欢迎访问中粮油脂采购网，请登录！');
        $(".online.username").html("");
        $('.manage').show();
        $('.login').show();
        $('.plat').hide();
        $('.manage_login').hide();
        $('.signOut').hide();
    });
    var username = sessionStorage.getItem('username');
    var reseIndex = sessionStorage.getItem('reseIndex');
    if($(".navPart .loginPart").length){
        $('.manage').show();
        $('.login').show();
        $('.plat').hide();
        $('.manage_login').hide();
        $('.signOut').hide();
        if (username != null && username != '' && reseIndex == '00') {
            $('.noLogin').html('欢迎访问中粮油脂采购网，'+username);
            $(".online.username").html('欢迎您，'+username);
            $('.signOut').show();
            $('.login').hide();
            $('.plat').show();
            $('.manage').hide();
            $('.manage_login').hide();
        } else if(username != null && username != '' && reseIndex != '00'){
            $('.noLogin').html('欢迎访问中粮油脂采购网，'+username);
            $(".online.username").html('欢迎您，'+username);
            $('.signOut').show();
            $('.login').hide();
            $('.manage_login').show();
            $('.manage').hide();
            $('.signOut').attr("href","/logins/login.html");
            if(reseIndex == '02'){                                                   // 采购员
                $('.manage_login').attr("href",'/logins/index_buyer.html');
            }else if(reseIndex == '01'){                                            //供应商管理员
                $('.manage_login').attr("href",'/logins/index_spl.html');
            }else if(reseIndex == '04'){                                            // 系统管理员
                $('.manage_login').attr("href",'/logins/index_mng.html');
            }else if(reseIndex == '05'){                                            //供应商审核员
                $('.manage_login').attr("href",'/logins/index_audit.html');
            }else if(reseIndex == '06'){                                            //分管领导
                $('.manage_login').attr("href",'/logins/index_pmng.html');
            }else if(reseIndex == '03'){                                            //专家登录
                $('.manage_login').attr("href",'/expert_grid/proj_list.html');
            }
        }else{
            $('.plat').hide();
            $('.signOut').hide();
            $('.manage_login').hide();
        }
    }

</script>